import { requestNew } from '@/utils/request'
const request = requestNew

// 获取礼包列表
export async function getStorePartnerHome(params) {
  const res = await request({
    url: '/store-partner/home',
    method: 'post',
    data: params || {}
  })
  return res
}

// 获取申请页面
export async function getStorePartnerStatus(params) {
  const res = await request({
    url: '/store-partner/status',
    method: 'post',
    data: params || {}
  })
  return res
}

// 提交申请参数
export async function storePartnerApply(params) {
  const res = await request({
    url: '/store-partner/apply',
    method: 'post',
    data: params || {}
  })
  return res
}

// 申请验证码
export async function getStorePartnerSms(params) {
  const res = await request({
    url: '/store-partner/sms/send',
    method: 'post',
    data: params || {}
  })
  return res
}

// 获取h5列表
export async function getStorePartnerH5(params) {
  const res = await request({
    url: '/store-partner/h5/home',
    method: 'post',
    data: params || {}
  })
  return res
}

// h5保证金提交
export async function storePartnerH5Apply(params) {
  const res = await request({
    url: '/store-partner/h5/apply',
    method: 'post',
    data: params || {}
  })
  return res
}

// h5保证金支付状态查询
export async function storePartnerPayState(params) {
  const res = await request({
    url: '/store-partner/h5/pay-result',
    method: 'post',
    data: params || {}
  })
  return res
}

// h5保证金支付进度查询
export async function storePartnerStatistics(params) {
  const res = await request({
    url: '/store-partner/h5/sales/statistics',
    method: 'post',
    data: params || {}
  })
  return res
}

// 查询二维码是否有效
export async function qrcode(params) {
  const res = await request({
    url: '/store-partner/h5/qrcode',
    method: 'post',
    data: params || {}
  })
  return res
}

// 新手专享商品
export async function newMembership(params) {
  const res = await request({
    url: '/activities/new-user',
    method: 'get',
    params: params || {}
  })
  return res
}

// 获取首页新手专享入口
export async function getHomeBanner(params) {
  const res = await request({
    url: '/home/banners/new-user',
    method: 'get',
    params: params || {},
    headers: {
      showLoading: false
    }
  })
  return res
}

// 是否新用户
export async function isNewUser(params) {
  const res = await request({
    url: '/user/is-new-user',
    method: 'get',
    params: params || {},
    headers: {
      showLoading: false
    }
  })
  return res
}

// 查询福利时间
export async function getUpgradeTime(params) {
  const res = await request({
    url: '/welfare/getUpgradeTime',
    method: 'get',
    params: params || {}
  })
  return res
}

// findGoodsByTime 福利时间 对应 商品
export async function findGoodsByTime(params) {
  const res = await request({
    url: '/welfare/findGoodsByTime',
    method: 'post',
    data: params || {}
  })
  return res
}

// 一级分类
export async function getCategoryFirst(params) {
  const res = await request({
    url: '/goods/first',
    method: 'get',
    data: params || {}
  })
  return res
}

// 二级分类
export async function getCategorySecond(params) {
  const res = await request({
    url: '/goods/second',
    method: 'post',
    data: params || {}
  })
  return res
}

// 商品分类
export async function getCategorySort(params) {
  const res = await request({
    url: '/goods/goods',
    method: 'post',
    data: params || {}
  })
  return res
}

// 获取签到首页
export async function getSignHome(params) {
  const res = await request({
    url: '/signin/circleHome',
    method: 'post',
    data: params || {}
  })
  return res
}

// 补卡
export async function signPatch(params) {
  const res = await request({
    url: '/signin/patchcard',
    method: 'post',
    data: params || {}
  })
  return res
}

// 打卡
export async function signPunch(params) {
  const res = await request({
    url: '/signin/circlePunchClock',
    method: 'post',
    data: params || {}
  })
  return res
}

// 领取赠品
export async function signReward(params) {
  const res = await request({
    url: '/signin/reward',
    method: 'post',
    data: params || {}
  })
  return res
}

// 领取赠品
export async function signPartReward(params) {
  const res = await request({
    url: '/signin/send-part-ward',
    method: 'post',
    data: params || {},
    headers: {
      'Content-Type': 'application/json'
    }
  })
  return res
}

// 领赠品
export async function circleReward(params) {
  const res = await request({
    url: '/signin/circleReward',
    method: 'post',
    data: params || {}
  })
  return res
}

// 领赠品
export async function signinInviteCode(params) {
  const res = await request({
    url: '/signin/inviteCode',
    method: 'post',
    data: params || {}
  })
  return res
}
// 签到提醒
export async function signInMessageNotice(params) {
  const res = await request({
    url: '/signin/set-message-notice',
    method: 'post',
    data: params || {}
  })
  return res
}
// 奖品记录
export async function signInRewardLog(params) {
  const res = await request({
    url: '/signin/query-activity-sign-in-log',
    method: 'post',
    data: params || {}
  })
  return res
}

// 领赠品
export async function circleCurrentRewards(params) {
  const res = await request({
    url: '/signin/circleCurrentRewards',
    method: 'post',
    data: params || {}
  })
  return res
}

// 中奖地址领取
export async function orderGiftCreate(params) {
  const res = await request({
    url: '/lottery-yun/receiveall',
    method: 'post',
    data: params || {}
  })
  return res
}
// 领赠品
export async function lotteryYunResult(params) {
  const res = await request({
    url: '/lottery-yun/result',
    method: 'get',
    data: params || {}
  })
  return res
}
// 是否购买过38礼包
export async function checkPacketRole(params = {}) {
  const res = await request({
    url: '/goods/activity/user/gift',
    headers: {
      'Content-Type': 'application/json'
    },
    method: 'post',
    data: params || {}
  })
  return res
}
// 获取全网影视地址
export async function getActivity(params = {}) {
  const res = await request({
    url: 'https://bx.bisinuolan.cn/api/goods/activity',
    method: 'post',
    data: params || {}
  })
  return res
}
// 获取二维码地址
export async function getActivity2(params = {}) {
  const res = await request({
    url: 'https://bx-uat.bisinuolan.cn/api/goods/activity',
    method: 'post',
    data: params || {}
  })
  return res
}

// 获取直播选品地址
export async function getLiveState(params = {}) {
  const res = await request({
    url: '/zb-live/live-goods/selection-info/get',
    method: 'get',
    data: params || {}
  })
  return res
}
